--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sbapp/kivymd/uix/toolbar/toolbar.py f8b3e3760b831745cf10d97aeae64e9c00a136a9 (f8b3e376) Text, 67.95 KB
T8b949e"""
Components/Toolbar
==================
.. seealso::
`Material Design spec, App bars: top <https://material.io/components/app-bars-top>`_
`Material Design spec, App bars: bottom <https://material.io/components/app-bars-bottom/app-bars-bottom.html>`_
`Material Design 3 spec, App bars: top <https://m3.material.io/components/top-app-bar/overview>`_
`Material Design 3 spec, App bars: bottom <https://m3.material.io/components/bottom-app-bar/overview>`_
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/app-bar-top.png
:align: center
`KivyMD` provides the following bar positions for use:
TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_ TopAppBar_
BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_ BottomAppBar_
.. TopAppBar_:
TopAppBar
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
MDBoxLayout:
orientation: "vertical"
md_bg_color: "#1E1E15"
MDTopAppBar:
title: "MDTopAppBar"
MDLabel:
text: "Content"
halign: "center"
'''
class Example(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange"
return Builder.load_string(KV)
Example().run()
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-1.png
:align: center
Add left menu
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
MDTopAppBar:
title: "MDTopAppBar"
anchor_title: "left"
left_action_items: [["menu", lambda x: app.callback()]]
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-2.png
:align: center
.. note::
The callback is optional. ``left_action_items: [["menu"]]`` would also work for a button that does nothing.
Add right menu
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
MDTopAppBar:
title: "MDTopAppBar"
anchor_title: "left"
right_action_items: [["dots-vertical", lambda x: app.callback()]]
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-3.png
:align: center
Add two item to the right menu
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
MDTopAppBar:
title: "MDTopAppBar"
anchor_title: "left"
right_action_items:
[
["dots-vertical", lambda x: app.callback_1()],
["clock", lambda x: app.callback_2()]
]
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-4.png
:align: center
Change bar color
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
MDTopAppBar:
title: "MDTopAppBar"
anchor_title: "left"
md_bg_color: "brown"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-5.png
:align: center
Change bar text color
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
MDTopAppBar:
title: "MDTopAppBar"
anchor_title: "left"
specific_text_color: "white"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-6.png
:align: center
Shadow elevation control
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
MDTopAppBar:
title: "Elevation 4"
anchor_title: "left"
elevation: 4
shadow_color: "brown"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-7.png
:align: center
.. BottomAppBar:
BottomAppBar
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
M2 style bottom app bar
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/app-bar-bottom.png
:align: center
Usage
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
MDBoxLayout:
md_bg_color: "#1E1E15"
# Will always be at the bottom of the screen.
MDBottomAppBar:
MDTopAppBar:
title: "MDBottomAppBar"
icon: "git"
type: "bottom"
left_action_items: [["menu", lambda x: x]]
'''
class Example(MDApp):
def build(self):
self.theme_cls.material_style = "M2"
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange"
return Builder.load_string(KV)
Example().run()
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-8.png
:align: center
Event on floating button
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Event ``on_action_button``:
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
title: "MDBottomAppBar"
icon: "git"
type: "bottom"
left_action_items: [["menu", lambda x: x]]
on_action_button: app.callback(self.icon)
Floating button position
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Mode:
\`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\` \`'free-end'\`
\`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\` \`'free-center'\`
\`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\` \`'end'\`
\`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\` \`'center'\`
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
title: "MDBottomAppBar"
icon: "git"
type: "bottom"
left_action_items: [["menu", lambda x: x]]
mode: "end"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-9.png
:align: center
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
title: "MDBottomAppBar"
icon: "git"
type: "bottom"
left_action_items: [["menu", lambda x: x]]
mode: "free-end"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-10.png
:align: center
Custom color
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
title: "MDBottomAppBar"
icon: "git"
type: "bottom"
left_action_items: [["menu", lambda x: x]]
icon_color: 0, 1, 0, 1
md_bg_bottom_color: "brown"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-11.png
:align: center
M3 style bottom app bar
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/app-bar-bottom-m3.png
:align: center
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
MDFloatLayout:
md_bg_color: "#151511"
MDBottomAppBar:
md_bg_color: "#232217"
icon_color: "#8A8D79"
MDFabBottomAppBarButton:
icon: "plus"
md_bg_color: "#373A22"
'''
class Example(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
return Builder.load_string(KV)
Example().run()
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/bottom-app-bar-m3-style-1.png
:align: center
Add action items
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: kv
#:import MDActionBottomAppBarButton kivymd.uix.toolbar.MDActionBottomAppBarButton
MDFloatLayout:
MDBottomAppBar:
action_items:
[
MDActionBottomAppBarButton(icon="gmail"),
MDActionBottomAppBarButton(icon="label-outline"),
MDActionBottomAppBarButton(icon="bookmark"),
]
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/bottom-app-bar-m3-style-2.png
:align: center
Change action items
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
#:import MDActionBottomAppBarButton kivymd.uix.toolbar.MDActionBottomAppBarButton
MDFloatLayout:
md_bg_color: "#151511"
MDBottomAppBar:
id: bottom_appbar
md_bg_color: "#232217"
icon_color: "#8A8D79"
action_items:
[
MDActionBottomAppBarButton(icon="gmail"),
MDActionBottomAppBarButton(icon="bookmark"),
]
MDFabBottomAppBarButton:
icon: "plus"
md_bg_color: "#373A22"
on_release: app.change_actions_items()
'''
class Example(MDApp):
def change_actions_items(self):
self.root.ids.bottom_appbar.action_items = [
MDActionBottomAppBarButton(icon="magnify"),
MDActionBottomAppBarButton(icon="trash-can-outline"),
MDActionBottomAppBarButton(icon="download-box-outline"),
]
def build(self):
self.theme_cls.theme_style = "Dark"
return Builder.load_string(KV)
Example().run()
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/bottom-app-bar-m3-style-3.gif
:align: center
A practical example
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: python
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.properties import StringProperty, BooleanProperty, ObjectProperty
from kivy.uix.behaviors import FocusBehavior
from kivy.uix.recycleboxlayout import RecycleBoxLayout
from kivy.uix.recycleview.layout import LayoutSelectionBehavior
from kivy.uix.recycleview.views import RecycleDataViewBehavior
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.toolbar import MDActionBottomAppBarButton
from kivymd.app import MDApp
from kivymd.utils import asynckivy
from faker import Faker # pip install Faker
KV = '''
#:import MDFabBottomAppBarButton kivymd.uix.toolbar.MDFabBottomAppBarButton
<UserCard>
orientation: "vertical"
adaptive_height: True
md_bg_color: "#373A22" if self.selected else "#1F1E15"
radius: 16
padding: 0, 0, 0, "16dp"
TwoLineAvatarListItem:
divider: None
_no_ripple_effect: True
text: root.name
secondary_text: root.time
theme_text_color: "Custom"
text_color: "#8A8D79"
secondary_theme_text_color: self.theme_text_color
secondary_text_color: self.text_color
ImageLeftWidget:
source: root.avatar
radius: self.height / 2
MDLabel:
text: root.text
adaptive_height: True
theme_text_color: "Custom"
text_color: "#8A8D79"
padding_x: "16dp"
shorten: True
shorten_from: "right"
Widget:
MDFloatLayout:
md_bg_color: "#151511"
RecycleView:
id: card_list
viewclass: "UserCard"
SelectableRecycleGridLayout:
orientation: 'vertical'
spacing: "16dp"
padding: "16dp"
default_size: None, dp(120)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
multiselect: True
touch_multiselect: True
MDBottomAppBar:
id: bottom_appbar
scroll_cls: card_list
allow_hidden: True
md_bg_color: "#232217"
icon_color: "#8A8D79"
MDFabBottomAppBarButton:
id: fab_button
icon: "plus"
md_bg_color: "#373A22"
'''
class UserCard(RecycleDataViewBehavior, MDBoxLayout):
name = StringProperty()
time = StringProperty()
text = StringProperty()
avatar = StringProperty()
callback = ObjectProperty(lambda x: x)
index = None
selected = BooleanProperty(False)
selectable = BooleanProperty(True)
def refresh_view_attrs(self, rv, index, data):
self.index = index
return super().refresh_view_attrs(rv, index, data)
def on_touch_down(self, touch):
if super().on_touch_down(touch):
return True
if self.collide_point(*touch.pos) and self.selectable:
Clock.schedule_once(self.callback)
return self.parent.select_with_touch(self.index, touch)
def apply_selection(self, rv, index, is_selected):
self.selected = is_selected
rv.data[index]["selected"] = is_selected
class SelectableRecycleGridLayout(
FocusBehavior, LayoutSelectionBehavior, RecycleBoxLayout
):
pass
class Test(MDApp):
selected_cards = False
def build(self):
return Builder.load_string(KV)
def on_tap_card(self, *args):
datas = [data["selected"] for data in self.root.ids.card_list.data]
if True in datas and not self.selected_cards:
self.root.ids.bottom_appbar.action_items = [
MDActionBottomAppBarButton(icon="gmail"),
MDActionBottomAppBarButton(icon="label-outline"),
MDActionBottomAppBarButton(icon="bookmark"),
]
self.root.ids.fab_button.icon = "pencil"
self.selected_cards = True
else:
if len(list(set(datas))) == 1 and not list(set(datas))[0]:
self.selected_cards = False
if not self.selected_cards:
self.root.ids.bottom_appbar.action_items = [
MDActionBottomAppBarButton(icon="magnify"),
MDActionBottomAppBarButton(icon="trash-can-outline"),
MDActionBottomAppBarButton(icon="download-box-outline"),
]
self.root.ids.fab_button.icon = "plus"
def on_start(self):
async def generate_card():
for i in range(10):
await asynckivy.sleep(0)
self.root.ids.card_list.data.append(
{
"name": fake.name(),
"time": fake.date(),
"avatar": fake.image_url(),
"text": fake.text(),
"selected": False,
"callback": self.on_tap_card,
}
)
self.on_tap_card()
fake = Faker()
Clock.schedule_once(lambda x: asynckivy.start(generate_card()))
Test().run()
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/bottom-app-bar-m3-style-4.gif
:align: center
Tooltips
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
You can add MDTooltips to the icons by adding a text string to the bar item,
as shown below:
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
from kivymd.uix.snackbar import Snackbar
KV = '''
MDBoxLayout:
orientation: "vertical"
MDTopAppBar:
title: "MDTopAppBar"
left_action_items: [["menu", "This is the navigation"]]
right_action_items:
[
[
"dots-vertical",
lambda x: app.callback(x),
"this is the More Actions"
]
]
MDLabel:
text: "Content"
halign: "center"
'''
class Example(MDApp):
def build(self):
self.theme_cls.material_style = "M2"
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange"
return Builder.load_string(KV)
def callback(self, button):
Snackbar(text="Hello World").open()
Example().run()
M3 style top app bar
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
from kivymd.uix.toolbar import MDTopAppBar
KV = '''
MDScreen:
MDBoxLayout:
id: box
orientation: "vertical"
spacing: "12dp"
pos_hint: {"top": 1}
adaptive_height: True
'''
class Example(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange"
return Builder.load_string(KV)
def on_start(self):
for type_height in ["medium", "large", "small"]:
self.root.ids.box.add_widget(
MDTopAppBar(
type_height=type_height,
headline_text=f"Headline {type_height.lower()}",
md_bg_color="brown",
left_action_items=[["arrow-left", lambda x: x]],
right_action_items=[
["attachment", lambda x: x],
["calendar", lambda x: x],
["dots-vertical", lambda x: x],
],
title="Title" if type_height == "small" else "",
anchor_title="left",
)
)
Example().run()
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-m3.png
:align: center
"""
Tff7b72from T7ee787__future__ Tff7b72import Te6edf3annotations
Te6edf3__all__ Tff7b72= Tb4b4b4(
Ta5d6ff"Ta5d6ffMDTopAppBarTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDBottomAppBarTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDActionBottomAppBarButtonTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDFabBottomAppBarButtonTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDActionOverFlowButtonTa5d6ff"Tb4b4b4,
Tb4b4b4)
Tff7b72import T7ee787os
Tff7b72from T7ee787math Tff7b72import Te6edf3cosTb4b4b4, Te6edf3radiansTb4b4b4, Te6edf3sin
Tff7b72from T7ee787typing Tff7b72import Te6edf3Union
Tff7b72from T7ee787kivy Tff7b72import Te6edf3Logger
Tff7b72from T7ee787kivyT7ee787.T7ee787animation Tff7b72import Te6edf3Animation
Tff7b72from T7ee787kivyT7ee787.T7ee787clock Tff7b72import Te6edf3Clock
Tff7b72from T7ee787kivyT7ee787.T7ee787coreT7ee787.T7ee787window Tff7b72import Te6edf3Window
Tff7b72from T7ee787kivyT7ee787.T7ee787lang Tff7b72import Te6edf3Builder
Tff7b72from T7ee787kivyT7ee787.T7ee787metrics Tff7b72import Te6edf3dp
Tff7b72from T7ee787kivyT7ee787.T7ee787properties Tff7b72import Tb4b4b4(
Te6edf3BooleanPropertyTb4b4b4,
Te6edf3ColorPropertyTb4b4b4,
Te6edf3ListPropertyTb4b4b4,
Te6edf3NumericPropertyTb4b4b4,
Te6edf3ObjectPropertyTb4b4b4,
Te6edf3OptionPropertyTb4b4b4,
Te6edf3StringPropertyTb4b4b4,
Tb4b4b4)
Tff7b72from T7ee787kivyT7ee787.T7ee787uixT7ee787.T7ee787boxlayout Tff7b72import Te6edf3BoxLayout
Tff7b72from T7ee787kivyT7ee787.T7ee787uixT7ee787.T7ee787floatlayout Tff7b72import Te6edf3FloatLayout
Tff7b72from T7ee787kivyT7ee787.T7ee787uixT7ee787.T7ee787scrollview Tff7b72import Te6edf3ScrollView
Tff7b72from T7ee787kivymd Tff7b72import Te6edf3uix_path
Tff7b72from T7ee787kivymdT7ee787.T7ee787color_definitions Tff7b72import Te6edf3text_colors
Tff7b72from T7ee787kivymdT7ee787.T7ee787material_resources Tff7b72import Te6edf3TOP_APP_BAR_ELEVATION
Tff7b72from T7ee787kivymdT7ee787.T7ee787theming Tff7b72import Te6edf3ThemableBehavior
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787behaviors Tff7b72import Tb4b4b4(
Te6edf3CommonElevationBehaviorTb4b4b4,
Te6edf3DeclarativeBehaviorTb4b4b4,
Te6edf3RotateBehaviorTb4b4b4,
Te6edf3ScaleBehaviorTb4b4b4,
Te6edf3SpecificBackgroundColorBehaviorTb4b4b4,
Tb4b4b4)
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787button Tff7b72import Te6edf3MDFloatingActionButtonTb4b4b4, Te6edf3MDIconButton
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787controllers Tff7b72import Te6edf3WindowController
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787list Tff7b72import Te6edf3OneLineIconListItem
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787menu Tff7b72import Te6edf3MDDropdownMenu
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787tooltip Tff7b72import Te6edf3MDTooltip
Tff7b72from T7ee787kivymdT7ee787.T7ee787utils Tff7b72import Te6edf3asynckivy
Tff7b72from T7ee787kivymdT7ee787.T7ee787utilsT7ee787.T7ee787set_bars_colors Tff7b72import Te6edf3set_bars_colors
Tff7b72with Tffa657openTb4b4b4(
Te6edf3osTff7b72.Td2a8ffpathTff7b72.Td2a8ffjoinTb4b4b4(Te6edf3uix_pathTb4b4b4, Ta5d6ff"Ta5d6fftoolbarTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6fftoolbar.kvTa5d6ff"Tb4b4b4)Tb4b4b4, Te6edf3encodingTff7b72=Ta5d6ff"Ta5d6ffutf-8Ta5d6ff"
Tb4b4b4) Tff7b72as Te6edf3kv_fileTb4b4b4:
Te6edf3BuilderTff7b72.Td2a8ffload_stringTb4b4b4(Te6edf3kv_fileTff7b72.Td2a8ffreadTb4b4b4(Tb4b4b4)Tb4b4b4)
Tff7b72class T56d364MDFabBottomAppBarButtonTb4b4b4(
Te6edf3MDFloatingActionButtonTb4b4b4, Te6edf3RotateBehaviorTb4b4b4, Te6edf3ScaleBehaviorTb4b4b4, Te6edf3MDTooltip
Tb4b4b4)Tb4b4b4:
T8b949e"""
Implements a floating action button (FAB) for a bar with type 'bottom'.
For more information, see in the
:class:`~kivymd.uix.button.MDFloatingActionButton` and
:class:`~kivymd.uix.behaviors.RotateBehavior` and
:class:`~kivymd.uix.behaviors.ScaleBehavior` and
:class:`~kivymd.uix.tooltip.MDTooltip`
classes documentation.
"""
Tff7b72def Td2a8ffset__radiusTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffset__radiusTb4b4b4(Tb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM3Ta5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffelevation Tff7b72= T79c0ff0
Tff7b72class T56d364ActionTopAppBarButtonTb4b4b4(Te6edf3MDIconButtonTb4b4b4, Te6edf3MDTooltipTb4b4b4)Tb4b4b4:
T8b949e"""
Implements action buttons on the bar.
For more information, see in the
:class:`~kivymd.uix.button.MDIconButton` and
:class:`~kivymd.uix.tooltip.MDTooltip`
classes documentation.
"""
T8b949e# The text of the menu item of the corresponding action button that will
T8b949e# be displayed in the `OverFlowMenu` menu.
Te6edf3overflow_text Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
Tff7b72class T56d364MDActionBottomAppBarButtonTb4b4b4(Te6edf3ActionTopAppBarButtonTb4b4b4)Tb4b4b4:
T8b949e"""
Implements action buttons for a :class:'MDBottomAppBar' class.
.. versionadded:: 1.2.0
For more information, see in the
:class:`~kivymd.uix.button.MDIconButton` and
:class:`~kivymd.uix.tooltip.MDTooltip`
classes documentation.
"""
Tff7b72class T56d364MDActionOverFlowButtonTb4b4b4(Te6edf3ActionTopAppBarButtonTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a bar action button for the `OverFlowMenu` menu.
For more information, see in the
:class:`~kivymd.uix.button.MDIconButton` and
:class:`~kivymd.uix.tooltip.MDTooltip`
classes documentation.
"""
Te6edf3icon Tff7b72= Ta5d6ff"Ta5d6ffdots-verticalTa5d6ff"
Tff7b72class T56d364OverFlowMenuTb4b4b4(Te6edf3MDDropdownMenuTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu for the items (:class:`~OverFlowMenuItem`) of the
corresponding action buttons.
"""
Tff7b72class T56d364OverFlowMenuItemTb4b4b4(Te6edf3OneLineIconListItemTb4b4b4)Tb4b4b4:
T8b949e"""Implements a menu (:class:`~OverFlowMenu`) item."""
Te6edf3icon Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
Tff7b72class T56d364NotchedBoxTb4b4b4(
Te6edf3ThemableBehaviorTb4b4b4,
Te6edf3CommonElevationBehaviorTb4b4b4,
Te6edf3SpecificBackgroundColorBehaviorTb4b4b4,
Te6edf3BoxLayoutTb4b4b4,
Tb4b4b4)Tb4b4b4:
Te6edf3elevation Tff7b72= Te6edf3NumericPropertyTb4b4b4(Te6edf3TOP_APP_BAR_ELEVATIONTb4b4b4)
Te6edf3notch_radius Tff7b72= Te6edf3NumericPropertyTb4b4b4(Tb4b4b4)
Te6edf3notch_center_x Tff7b72= Te6edf3NumericPropertyTb4b4b4(Ta5d6ff"Ta5d6ff100dpTa5d6ff"Tb4b4b4)
Te6edf3_indices_right Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
Te6edf3_vertices_right Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
Te6edf3_indices_left Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
Te6edf3_vertices_left Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
Te6edf3_rounded_rectangle_height Tff7b72= Te6edf3NumericPropertyTb4b4b4(Ta5d6ff"Ta5d6ff6dpTa5d6ff"Tb4b4b4)
Te6edf3_total_angle Tff7b72= Te6edf3NumericPropertyTb4b4b4(T79c0ff180Tb4b4b4)
Te6edf3_rectangle_left_pos Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4[T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4)
Te6edf3_rectangle_left_width Tff7b72= Te6edf3NumericPropertyTb4b4b4(Tb4b4b4)
Te6edf3_rectangle_right_pos Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4[T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4)
Te6edf3_rectangle_right_width Tff7b72= Te6edf3NumericPropertyTb4b4b4(Tb4b4b4)
Te6edf3_rounding_percentage Tff7b72= Te6edf3NumericPropertyTb4b4b4(T79c0ff0.15Tb4b4b4)
Te6edf3_shift Tff7b72= Te6edf3NumericPropertyTb4b4b4(Te6edf3dpTb4b4b4(T79c0ff4Tb4b4b4)Tb4b4b4)
Tff7b72def Tff7b72__init__Tb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwTb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ff__init__Tb4b4b4(Tff7b72*Tff7b72*Te6edf3kwTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffbindTb4b4b4(
Te6edf3sizeTff7b72=Tff7b72selfTff7b72.Td2a8ff_update_canvasTb4b4b4,
Te6edf3posTff7b72=Tff7b72selfTff7b72.Td2a8ff_update_canvasTb4b4b4,
Te6edf3notch_radiusTff7b72=Tff7b72selfTff7b72.Td2a8ff_update_canvasTb4b4b4,
Te6edf3notch_center_xTff7b72=Tff7b72selfTff7b72.Td2a8ff_update_canvasTb4b4b4,
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72selfTff7b72.Td2a8ff_update_canvasTb4b4b4)
Tff7b72def Td2a8ff_update_canvasTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
Te6edf3pos Tff7b72= Tff7b72selfTff7b72.Td2a8ffpos
Te6edf3size Tff7b72= Tb4b4b4[
Tff7b72selfTff7b72.Td2a8ffwidthTb4b4b4,
Tff7b72selfTff7b72.Td2a8ffsizeTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ff_rounded_rectangle_height Tff7b72/ T79c0ff2Tb4b4b4,
Tb4b4b4]
Te6edf3notch_center_x Tff7b72= Tff7b72selfTff7b72.Td2a8ffposTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Tff7b72selfTff7b72.Td2a8ffnotch_center_x
Te6edf3circle_radius Tff7b72= Tff7b72selfTff7b72.Td2a8ffnotch_radius
Te6edf3degree_diff Tff7b72= Tffa657intTb4b4b4(Tb4b4b4(T79c0ff180 Tff7b72- Tff7b72selfTff7b72.Td2a8ff_total_angleTb4b4b4) Tff7b72/ T79c0ff2Tb4b4b4)
Te6edf3circle_center Tff7b72= Tb4b4b4[Te6edf3notch_center_xTb4b4b4, Te6edf3posTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72+ Te6edf3sizeTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4]
Te6edf3left_circle_pos Tff7b72= Tff7b72selfTff7b72.Td2a8ff_points_on_circleTb4b4b4(
Te6edf3circle_centerTb4b4b4, Te6edf3circle_radiusTb4b4b4, T79c0ff180 Tff7b72+ Te6edf3degree_diffTb4b4b4, T79c0ff270
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_rectangle_left_pos Tff7b72= Tb4b4b4[
Te6edf3posTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4,
Te6edf3posTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72+ Te6edf3sizeTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ff_rounded_rectangle_height Tff7b72/ T79c0ff2Tb4b4b4,
Tb4b4b4]
Tff7b72selfTff7b72.Td2a8ff_rectangle_left_width Tff7b72= Te6edf3left_circle_posTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffposTb4b4b4[T79c0ff0Tb4b4b4]
Te6edf3right_circle_pos Tff7b72= Tff7b72selfTff7b72.Td2a8ff_points_on_circleTb4b4b4(
Te6edf3circle_centerTb4b4b4, Te6edf3circle_radiusTb4b4b4, Tff7b72-Te6edf3degree_diffTb4b4b4, Tff7b72-T79c0ff90
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_rectangle_right_pos Tff7b72= Tb4b4b4[
Te6edf3right_circle_posTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4,
Te6edf3posTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72+ Te6edf3sizeTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ff_rounded_rectangle_height Tff7b72/ T79c0ff2Tb4b4b4,
Tb4b4b4]
Tff7b72selfTff7b72.Td2a8ff_rectangle_right_width Tff7b72= Te6edf3posTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Te6edf3sizeTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Te6edf3right_circle_posTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4[T79c0ff0Tb4b4b4]
Te6edf3raw_vertices_left Tff7b72= Tff7b72selfTff7b72.Td2a8ff_make_verticesTb4b4b4(
Te6edf3posTb4b4b4, Tb4b4b4[Te6edf3notch_center_x Tff7b72- Te6edf3posTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4, Te6edf3sizeTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4]Tb4b4b4, Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4, Te6edf3left_circle_pos
Tb4b4b4)
Te6edf3raw_vertices_right Tff7b72= Tff7b72selfTff7b72.Td2a8ff_make_verticesTb4b4b4(
Tb4b4b4[Te6edf3notch_center_xTb4b4b4, Te6edf3posTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4]Tb4b4b4,
Tb4b4b4[Te6edf3sizeTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Te6edf3posTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Te6edf3notch_center_xTb4b4b4, Te6edf3sizeTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4,
Te6edf3right_circle_posTb4b4b4,
Tb4b4b4)
Te6edf3left_verticesTb4b4b4, Te6edf3left_indices Tff7b72= Tff7b72selfTff7b72.Td2a8ff_make_vertices_indicesTb4b4b4(
Te6edf3raw_vertices_left
Tb4b4b4)
Te6edf3right_verticesTb4b4b4, Te6edf3right_indices Tff7b72= Tff7b72selfTff7b72.Td2a8ff_make_vertices_indicesTb4b4b4(
Te6edf3raw_vertices_right
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_update_meshTb4b4b4(Te6edf3left_verticesTb4b4b4, Te6edf3left_indicesTb4b4b4, Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_update_meshTb4b4b4(Te6edf3right_verticesTb4b4b4, Te6edf3right_indicesTb4b4b4, Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4)
Tff7b72def Td2a8ff_update_meshTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3verticesTb4b4b4, Te6edf3indicesTb4b4b4, Te6edf3modeTb4b4b4)Tb4b4b4:
Tff7b72if Te6edf3mode Tff7b72== Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_indices_left Tff7b72= Te6edf3indices
Tff7b72selfTff7b72.Td2a8ff_vertices_left Tff7b72= Te6edf3vertices
Tff7b72elseTb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_indices_right Tff7b72= Te6edf3indices
Tff7b72selfTff7b72.Td2a8ff_vertices_right Tff7b72= Te6edf3vertices
Tff7b72return Tff7b72True
Tf0883e@staticmethod
Tff7b72def Td2a8ff_make_vertices_indicesTb4b4b4(Te6edf3points_listTb4b4b4)Tb4b4b4:
Te6edf3vertices Tff7b72= Tb4b4b4[Tb4b4b4]
Te6edf3indices Tff7b72= Tb4b4b4[Tb4b4b4]
Tff7b72for Te6edf3indexTb4b4b4, Te6edf3point Tff7b72in Tffa657enumerateTb4b4b4(Te6edf3points_listTb4b4b4)Tb4b4b4:
Te6edf3indicesTff7b72.Td2a8ffappendTb4b4b4(Te6edf3indexTb4b4b4)
Te6edf3verticesTff7b72.Td2a8ffextendTb4b4b4(Tb4b4b4[Te6edf3pointTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4, Te6edf3pointTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4, T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4)
Tff7b72return Tb4b4b4[Te6edf3verticesTb4b4b4, Te6edf3indicesTb4b4b4]
Tf0883e@staticmethod
Tff7b72def Td2a8ff_make_verticesTb4b4b4(Te6edf3rectangle_posTb4b4b4, Te6edf3rectangle_sizeTb4b4b4, Te6edf3modeTb4b4b4, Te6edf3notch_pointsTff7b72=Tb4b4b4[Tb4b4b4]Tb4b4b4)Tb4b4b4:
Te6edf3x Tff7b72= Te6edf3rectangle_posTb4b4b4[T79c0ff0Tb4b4b4]
Te6edf3y Tff7b72= Te6edf3rectangle_posTb4b4b4[T79c0ff1Tb4b4b4]
Te6edf3w Tff7b72= Te6edf3rectangle_sizeTb4b4b4[T79c0ff0Tb4b4b4]
Te6edf3h Tff7b72= Te6edf3rectangle_sizeTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72if Te6edf3mode Tff7b72== Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4:
Te6edf3rectangle_vertices Tff7b72= Tb4b4b4[Tb4b4b4[Te6edf3xTb4b4b4, Te6edf3yTb4b4b4]Tb4b4b4, Tb4b4b4[Te6edf3xTb4b4b4, Te6edf3y Tff7b72+ Te6edf3hTb4b4b4]Tb4b4b4]
Tff7b72elif Te6edf3mode Tff7b72== Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4:
Te6edf3rectangle_vertices Tff7b72= Tb4b4b4[Tb4b4b4[Te6edf3x Tff7b72+ Te6edf3wTb4b4b4, Te6edf3yTb4b4b4]Tb4b4b4, Tb4b4b4[Te6edf3x Tff7b72+ Te6edf3wTb4b4b4, Te6edf3y Tff7b72+ Te6edf3hTb4b4b4]Tb4b4b4]
Te6edf3rectangle_verticesTff7b72.Td2a8ffextendTb4b4b4(Te6edf3notch_pointsTb4b4b4)
Tff7b72if Te6edf3mode Tff7b72== Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4:
Te6edf3rectangle_verticesTff7b72.Td2a8ffextendTb4b4b4(Tb4b4b4[Tb4b4b4[Te6edf3x Tff7b72+ Te6edf3wTb4b4b4, Te6edf3yTb4b4b4]Tb4b4b4]Tb4b4b4)
Tff7b72elif Te6edf3mode Tff7b72== Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4:
Te6edf3rectangle_verticesTff7b72.Td2a8ffextendTb4b4b4(Tb4b4b4[Tb4b4b4[Te6edf3xTb4b4b4, Te6edf3yTb4b4b4]Tb4b4b4]Tb4b4b4)
Tff7b72return Te6edf3rectangle_vertices
Tf0883e@staticmethod
Tff7b72def Td2a8ff_points_on_circleTb4b4b4(Te6edf3centerTb4b4b4, Te6edf3radiusTb4b4b4, Te6edf3start_angleTb4b4b4, Te6edf3end_angleTb4b4b4)Tb4b4b4:
Te6edf3points Tff7b72= Tb4b4b4[Tb4b4b4]
Te6edf3y_diff Tff7b72= Tff7b72False
Tff7b72if Te6edf3end_angle Tff7b72>Tff7b72= T79c0ff180Tb4b4b4:
Te6edf3step Tff7b72= T79c0ff1
Te6edf3end_angle Tff7b72+Tff7b72= T79c0ff1
Tff7b72elif Te6edf3end_angle Tff7b72<Tff7b72= T79c0ff0Tb4b4b4:
Te6edf3step Tff7b72= Tff7b72-T79c0ff1
Te6edf3end_angle Tff7b72-Tff7b72= T79c0ff1
Tff7b72elseTb4b4b4:
Tff7b72raise Tf85149ExceptionTb4b4b4(Ta5d6ff"Ta5d6ffInvalid value for start angleTa5d6ff"Tb4b4b4)
Tff7b72for Te6edf3degree Tff7b72in Tffa657rangeTb4b4b4(Te6edf3start_angleTb4b4b4, Te6edf3end_angleTb4b4b4, Te6edf3stepTb4b4b4)Tb4b4b4:
Te6edf3angle Tff7b72= Te6edf3radiansTb4b4b4(Te6edf3degreeTb4b4b4)
Te6edf3x Tff7b72= Te6edf3centerTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Tb4b4b4(Te6edf3radius Tff7b72* Te6edf3cosTb4b4b4(Te6edf3angleTb4b4b4)Tb4b4b4)
Te6edf3y Tff7b72= Te6edf3centerTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72+ Tb4b4b4(Te6edf3radius Tff7b72* Te6edf3sinTb4b4b4(Te6edf3angleTb4b4b4)Tb4b4b4)
Tff7b72if Te6edf3y_diff Tff7b72is Tff7b72FalseTb4b4b4:
Te6edf3y_diff Tff7b72= Tffa657absTb4b4b4(Te6edf3y Tff7b72- Te6edf3centerTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4)
Te6edf3y Tff7b72+Tff7b72= Te6edf3y_diff
Te6edf3pointsTff7b72.Td2a8ffappendTb4b4b4(Tb4b4b4[Te6edf3xTb4b4b4, Te6edf3yTb4b4b4]Tb4b4b4)
Tff7b72return Te6edf3points
Tff7b72class T56d364MDTopAppBarTb4b4b4(Te6edf3DeclarativeBehaviorTb4b4b4, Te6edf3NotchedBoxTb4b4b4, Te6edf3WindowControllerTb4b4b4)Tb4b4b4:
T8b949e"""
Top app bar class.
For more information, see in the
:class:`~kivymd.uix.behaviors.DeclarativeBehavior` and
:class:`~NotchedBox` and
:class:`~kivymd.uix.controllers.WindowController`
classes documentation.
:Events:
`on_action_button`
Method for the button used for the :class:`~MDBottomAppBar` class.
"""
Te6edf3left_action_items Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The icons on the left of the bar.
To add one, append a list like the following:
.. code-block:: kv
MDTopAppBar:
left_action_items:
["dots-vertical", callback, "tooltip text", "overflow text"]
``icon_name`` - is a string that corresponds to an icon definition:
.. code-block:: kv
MDTopAppBar:
right_action_items: [["home"]]
``callback`` - is the function called on a touch release event and:
.. code-block:: kv
MDTopAppBar:
right_action_items: [["home", lambda x: app.callback(x)]]
.. code-block:: python
class Test(MDApp):
def callback(self, instance_action_top_appbar_button):
print(instance_action_top_appbar_button)
``tooltip text`` - is the text to be displayed in the tooltip:
.. code-block:: kv
MDTopAppBar:
right_action_items:
[
["home", lambda x: app.callback(x), "Home"],
["message-star", lambda x: app.callback(x), "Message star"],
["message-question", lambda x: app.callback(x), "Message question"],
["message-reply", lambda x: app.callback(x), "Message reply"],
]
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-tooltip-text.png
:align: center
``overflow text`` - is the text for menu items (:class:`~OverFlowMenuItem`)
of the corresponding action buttons:
.. code-block:: kv
MDTopAppBar:
use_overflow: True
right_action_items:
[
["home", lambda x: x, "", "Home"],
["message-star", lambda x: x, "", "Message star"],
["message-question", lambda x: x, "" , "Message question"],
["message-reply", lambda x: x, "", "Message reply"],
]
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-overflow-text.png
:align: center
``icon color`` - icon color:
.. code-block:: kv
MDTopAppBar:
right_action_items:
[
[
"dots-vertical",
callback,
"tooltip text",
"overflow text",
(1, 1, 1, 1),
]
]
Both the ``callback`` and ``tooltip text`` and ``overflow text`` and ``icon color`` are
optional but the order must be preserved.
:attr:`left_action_items` is an :class:`~kivy.properties.ListProperty`
and defaults to `[]`.
"""
Te6edf3right_action_items Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The icons on the left of the bar.
Works the same way as :attr:`left_action_items`.
:attr:`right_action_items` is an :class:`~kivy.properties.ListProperty`
and defaults to `[]`.
"""
Te6edf3title Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
Text app bar.
.. code-block:: kv
MDTopAppBar:
title: "MDTopAppBar"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-title.png
:align: center
:attr:`title` is an :class:`~kivy.properties.StringProperty`
and defaults to `''`.
"""
Te6edf3mode Tff7b72= Te6edf3OptionPropertyTb4b4b4(
Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fffree-endTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6fffree-centerTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffendTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Floating button position. Only for :class:`~MDBottomAppBar` class.
Available options are: `'free-end'`, `'free-center'`, `'end'`, `'center'`.
.. rubric:: Mode "end":
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
title: "Title"
icon: "git"
type: "bottom"
left_action_items: [["menu", lambda x: x]]
mode: "end"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-9.png
:align: center
.. rubric:: Mode "free-end":
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
mode: "free-end"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-10.png
:align: center
.. rubric:: Mode "free-center":
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
mode: "free-center"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-free-center.png
:align: center
.. rubric:: Mode "center":
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
mode: "center"
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-center.png
:align: center
:attr:`mode` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'center'`.
"""
Tffa657type Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
When using the :class:`~MDBottomAppBar` class, the parameter ``type``
must be set to `'bottom'`:
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
type: "bottom"
Available options are: `'top'`, `'bottom'`.
:attr:`type` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'top'`.
"""
Te6edf3opposite_colors Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72FalseTb4b4b4)
T8b949e"""
Changes the color of the label to the color opposite to the main theme.
.. code-block:: kv
MDTopAppBar:
opposite_colors: True
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-opposite-true.png
:align: center
.. code-block:: kv
MDTopAppBar:
opposite_colors: False
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-opposite-false.png
:align: center
"""
Te6edf3md_bg_bottom_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
The background color in (r, g, b, a) or string format for the bar with the
``bottom`` mode.
.. versionadded:: 1.0.0
.. code-block:: kv
MDBottomAppBar:
MDTopAppBar:
md_bg_bottom_color: "brown"
icon_color: self.md_bg_bottom_color
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-md-bg-bottom-color.png
:align: center
:attr:`md_bg_bottom_color` is an :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""
Te6edf3set_bars_color Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72FalseTb4b4b4)
T8b949e"""
If `True` the background color of the bar status will be set automatically
according to the current color of the bar.
.. versionadded:: 1.0.0
See `set_bars_colors <https://kivymd.readthedocs.io/en/latest/api/kivymd/utils/set_bars_colors/>`_
for more information.
:attr:`set_bars_color` is an :class:`~kivy.properties.BooleanProperty`
and defaults to `False`.
"""
Te6edf3use_overflow Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72FalseTb4b4b4)
T8b949e"""
As a top app bar is resized, actions move to the overflow menu from right
to left.
.. versionadded:: 1.0.0
.. code-block:: kv
MDTopAppBar:
title: "MDTopAppBar"
use_overflow: True
right_action_items:
[
["home", lambda x: x, "Home", "Home"],
["message-star", lambda x: x, "Message star", "Message star"],
["message-question", lambda x: x, "Message question", "Message question"],
["message-reply", lambda x: x, "Message reply", "Message reply"],
]
:attr:`use_overflow` is an :class:`~kivy.properties.BooleanProperty`
and defaults to `False`.
"""
Te6edf3overflow_cls Tff7b72= Te6edf3ObjectPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
Must be an object of the :class:`~kivymd.uix.menu.MDDropdownMenu' class.
See :class:`~kivymd.uix.menu.MDDropdownMenu` class documentation for more
information.
.. versionadded:: 1.0.0
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
from kivymd.uix.menu import MDDropdownMenu
KV = '''
#:import CustomOverFlowMenu __main__.CustomOverFlowMenu
MDBoxLayout:
orientation: "vertical"
MDTopAppBar:
title: "MDTopAppBar"
use_overflow: True
overflow_cls: CustomOverFlowMenu()
right_action_items:
[
["home", lambda x: x, "Home", "Home"],
["message-star", lambda x: x, "Message star", "Message star"],
["message-question", lambda x: x, "Message question", "Message question"],
["message-reply", lambda x: x, "Message reply", "Message reply"],
]
MDLabel:
text: "Content"
halign: "center"
'''
class CustomOverFlowMenu(MDDropdownMenu):
# In this class you can set custom properties for the overflow menu.
pass
class Example(MDApp):
def build(self):
return Builder.load_string(KV)
def callback(self, instance_action_top_appbar_button):
print(instance_action_top_appbar_button)
Example().run()
:attr:`overflow_cls` is an :class:`~kivy.properties.ObjectProperty`
and defaults to `None`.
"""
T8b949e# Attributes only for the BottomAppBar class.
Te6edf3icon Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
Floating button. Only for :class:`~MDBottomAppBar` class.
:attr:`icon` is an :class:`~kivy.properties.StringProperty`
and defaults to `'android'`.
"""
Te6edf3icon_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
Color in (r, g, b, a) or string format action button. Only for
:class:`~MDBottomAppBar` class.
:attr:`icon_color` is an :class:`~kivy.properties.ColorProperty`
and defaults to `[]`.
"""
T8b949e# MD3 Style attributes.
Te6edf3anchor_title Tff7b72= Te6edf3OptionPropertyTb4b4b4(Tff7b72NoneTb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Position bar title. Only used with `material_style = 'M3'`
Available options are: `'left'`, `'center'`, `'right'`.
:attr:`anchor_title` is an :class:`~kivy.properties.OptionProperty`
and defaults to `None`.
"""
Te6edf3headline_text Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
Headline text bar.
.. versionadded:: 1.0.0
:attr:`headline_text` is an :class:`~kivy.properties.StringProperty`
and defaults to `''`.
"""
Te6edf3headline_text_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
Headline text color in (r, g, b, a) or string format.
.. versionadded:: 1.0.0
:attr:`headline_text_color` is an :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""
Te6edf3type_height Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ffsmallTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffmediumTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6fflargeTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffsmallTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Bar height type.
.. versionadded:: 1.0.0
Available options are: 'medium', 'large', 'small'.
:attr:`type_height` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'small'`.
"""
T8b949e# List of action buttons (ActionTopAppBarButton instance) that have been
T8b949e# .added to the overflow
Te6edf3_hidden_items Tff7b72= Tb4b4b4[Tb4b4b4]
T8b949e# See `kivymd.uix.menu.MDDropdownMenu.items` attribute.
Te6edf3_overflow_menu_items Tff7b72= Tb4b4b4[Tb4b4b4]
Tff7b72def Tff7b72__init__Tb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_button Tff7b72= Te6edf3MDFabBottomAppBarButtonTb4b4b4(Tb4b4b4)
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ff__init__Tb4b4b4(Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffregister_event_typeTb4b4b4(Ta5d6ff"Ta5d6ffon_action_buttonTa5d6ff"Tb4b4b4)
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8fficon_colorTb4b4b4:
Tff7b72selfTff7b72.Td2a8fficon_color Tff7b72= Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffprimary_color
Tff7b72selfTff7b72.Td2a8ffbindTb4b4b4(Te6edf3specific_text_colorTff7b72=Tff7b72selfTff7b72.Td2a8ffupdate_action_bar_text_colorsTb4b4b4)
Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffbindTb4b4b4(
Te6edf3material_styleTff7b72=Tff7b72selfTff7b72.Td2a8ffupdate_bar_heightTb4b4b4,
Te6edf3primary_paletteTff7b72=Tff7b72selfTff7b72.Td2a8ffupdate_md_bg_colorTb4b4b4,
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(
Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffon_left_action_itemsTb4b4b4(T79c0ff0Tb4b4b4, Tff7b72selfTff7b72.Td2a8ffleft_action_itemsTb4b4b4)
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(
Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffon_right_action_itemsTb4b4b4(T79c0ff0Tb4b4b4, Tff7b72selfTff7b72.Td2a8ffright_action_itemsTb4b4b4)
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffset_md_bg_colorTb4b4b4(T79c0ff0Tb4b4b4, Tff7b72selfTff7b72.Td2a8ffmd_bg_colorTb4b4b4)Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffon_type_heightTb4b4b4(T79c0ff0Tb4b4b4, Tff7b72selfTff7b72.Td2a8fftype_heightTb4b4b4)Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(
Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffupdate_anchor_titleTb4b4b4(Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_styleTb4b4b4)
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72selfTff7b72.Td2a8ffupdate_floating_radiusTb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcheck_overflow_clsTb4b4b4)
Tff7b72def Td2a8ffset_headline_font_styleTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8fftype_height Tff7b72in Tb4b4b4(Ta5d6ff"Ta5d6ffmediumTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6fflargeTa5d6ff"Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8fflabel_headlineTff7b72.Td2a8fffont_style Tff7b72= Tb4b4b4{
Ta5d6ff"Ta5d6ffmediumTa5d6ff"Tb4b4b4: Ta5d6ff"Ta5d6ffH6Ta5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6fflargeTa5d6ff"Tb4b4b4: Ta5d6ff"Ta5d6ffH5Ta5d6ff"Tb4b4b4,
Tb4b4b4}Tb4b4b4[Tff7b72selfTff7b72.Td2a8fftype_heightTb4b4b4]
Tff7b72def Td2a8ffon_widthTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3widthTb4b4b4: Tffa657floatTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the bar is resized (size of the application window).
"""
Tff7b72if Tff7b72selfTff7b72.Td2a8ffmode Tff7b72== Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffx Tff7b72= Te6edf3width Tff7b72/ T79c0ff2 Tff7b72- Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2
Tff7b72elseTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffx Tff7b72= Te6edf3width Tff7b72- Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72* T79c0ff2
T8b949e# The user reduces the width of the window.
Tff7b72if Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ffget_window_width_resizing_directionTb4b4b4(Tb4b4b4) Tff7b72== Ta5d6ff"Ta5d6ffleftTa5d6ff"
Tff7b72and Tff7b72selfTff7b72.Td2a8ffuse_overflow
Tff7b72and Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8fflabel_titleTff7b72.Td2a8ffis_shortened
Tb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffoverflow_action_button_is_addedTb4b4b4(Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffadd_overflow_buttonTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffadd_action_button_to_overflowTb4b4b4(Tb4b4b4)
T8b949e# The user increases the width of the window.
Tff7b72if Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ffget_window_width_resizing_directionTb4b4b4(Tb4b4b4) Tff7b72== Ta5d6ff"Ta5d6ffrightTa5d6ff"
Tff7b72and Tff7b72selfTff7b72.Td2a8ffuse_overflow
Tff7b72and Tff7b72not Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8fflabel_titleTff7b72.Td2a8ffis_shortened
Tff7b72and Tff7b72selfTff7b72.Td2a8ffoverflow_clsTff7b72.Td2a8ffitems
Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffreturn_action_button_to_toolbarTb4b4b4(Tb4b4b4)
Tff7b72def Td2a8ffreturn_action_button_to_toolbarTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72if Tffa657lenTb4b4b4(Tff7b72selfTff7b72.Td2a8ff_hidden_itemsTb4b4b4)Tb4b4b4:
Te6edf3action_button Tff7b72= Tff7b72selfTff7b72.Td2a8ff_hidden_itemsTff7b72.Td2a8ffpopTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffadd_widgetTb4b4b4(Te6edf3action_buttonTb4b4b4, Te6edf3indexTff7b72=T79c0ff1Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffupdate_overflow_menu_itemsTb4b4b4(Te6edf3action_buttonTb4b4b4)
Tff7b72if Tff7b72not Tffa657lenTb4b4b4(Tff7b72selfTff7b72.Td2a8ff_hidden_itemsTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffremove_overflow_buttonTb4b4b4(Tb4b4b4)
Tff7b72def Td2a8ffremove_overflow_buttonTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Removes an overflow button to the bar."""
Tff7b72if Tff7b72selfTff7b72.Td2a8ffoverflow_action_button_is_addedTb4b4b4(Tb4b4b4)Tb4b4b4:
Te6edf3action_overflow_button Tff7b72= Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffchildrenTb4b4b4[T79c0ff0Tb4b4b4]
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffremove_widgetTb4b4b4(Te6edf3action_overflow_buttonTb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_overflow_menu_items Tff7b72= Tb4b4b4[Tb4b4b4]
Tff7b72def Td2a8ffadd_overflow_buttonTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Adds an overflow button to the bar."""
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffadd_widgetTb4b4b4(
Te6edf3MDActionOverFlowButtonTb4b4b4(
Te6edf3theme_text_colorTff7b72=Ta5d6ff"Ta5d6ffCustomTa5d6ff"
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffopposite_colors
Tff7b72else Ta5d6ff"Ta5d6ffPrimaryTa5d6ff"Tb4b4b4,
Te6edf3text_colorTff7b72=Tff7b72selfTff7b72.Td2a8ffspecific_text_colorTb4b4b4,
Te6edf3opposite_colorsTff7b72=Tff7b72selfTff7b72.Td2a8ffopposite_colorsTb4b4b4,
Te6edf3on_releaseTff7b72=Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffoverflow_clsTff7b72.Td2a8ffopenTb4b4b4(Tb4b4b4)Tb4b4b4,
Tb4b4b4)
Tb4b4b4)
Tff7b72def Td2a8ffoverflow_action_button_is_addedTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657boolTb4b4b4:
T8b949e"""
Returns `True` if at least one action button
(:class:`~ActionTopAppBarButton') on the bar is added to the
overflow.
"""
Tff7b72if Tb4b4b4(
Tff7b72not Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffchildrenTb4b4b4[T79c0ff0Tb4b4b4]Tff7b72.Td2a8ff__class__
Tff7b72is Te6edf3MDActionOverFlowButton
Tb4b4b4)Tb4b4b4:
Tff7b72return Tff7b72False
Tff7b72return Tff7b72True
Tff7b72def Td2a8ffadd_action_button_to_overflowTb4b4b4(Tff7b72selfTb4b4b4)Tb4b4b4:
T8b949e"""Adds an overflow button to the bar."""
Tff7b72if Tffa657lenTb4b4b4(Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffchildrenTb4b4b4) Tff7b72> T79c0ff1Tb4b4b4:
Te6edf3button_to_be_added Tff7b72= Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffchildrenTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72selfTff7b72.Td2a8ff_hidden_itemsTff7b72.Td2a8ffappendTb4b4b4(Te6edf3button_to_be_addedTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffremove_widgetTb4b4b4(Te6edf3button_to_be_addedTb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_overflow_menu_itemsTff7b72.Td2a8ffappendTb4b4b4(
Tb4b4b4{
Ta5d6ff"Ta5d6ffviewclassTa5d6ff"Tb4b4b4: Ta5d6ff"Ta5d6ffOverFlowMenuItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6fficonTa5d6ff"Tb4b4b4: Te6edf3button_to_be_addedTff7b72.Td2a8fficonTb4b4b4,
Ta5d6ff"Ta5d6fftextTa5d6ff"Tb4b4b4: Te6edf3button_to_be_addedTff7b72.Td2a8ffoverflow_textTb4b4b4,
Ta5d6ff"Ta5d6ffheightTa5d6ff"Tb4b4b4: Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4)Tb4b4b4,
Ta5d6ff"Ta5d6ffon_pressTa5d6ff"Tb4b4b4: Tff7b72lambda Tff7b72*Te6edf3xTb4b4b4: Te6edf3button_to_be_addedTff7b72.Td2a8ffon_releaseTb4b4b4(Tff7b72*Te6edf3xTb4b4b4)Tb4b4b4,
Tb4b4b4}
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffoverflow_clsTff7b72.Td2a8ffitems Tff7b72= Tff7b72selfTff7b72.Td2a8ff_overflow_menu_items
Tff7b72selfTff7b72.Td2a8ffoverflow_clsTff7b72.Td2a8ffcaller Tff7b72= Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffchildrenTb4b4b4[T79c0ff0Tb4b4b4]
Tff7b72def Td2a8ffcheck_overflow_clsTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
If the user does not set the :attr:`overflow_cls` attribute but uses
overflows, the :attr:`overflow_cls` attribute will use the default
value.
"""
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffoverflow_clsTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffoverflow_cls Tff7b72= Tff7b72selfTff7b72.Td2a8ffget_default_overflow_clsTb4b4b4(Tb4b4b4)
Tff7b72def Td2a8ffon_typeTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3type_valueTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Called when the value of the :attr:`type` attribute changes."""
Tff7b72if Te6edf3type_value Tff7b72== Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffbindTb4b4b4(Te6edf3center_xTff7b72=Tff7b72selfTff7b72.Td2a8ffsetterTb4b4b4(Ta5d6ff"Ta5d6ffnotch_center_xTa5d6ff"Tb4b4b4)Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffbindTb4b4b4(
Te6edf3on_releaseTff7b72=Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffdispatchTb4b4b4(Ta5d6ff"Ta5d6ffon_action_buttonTa5d6ff"Tb4b4b4)
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffx Tff7b72= Tb4b4b4(
Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2 Tff7b72- Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffy Tff7b72= Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ffcenterTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2Tb4b4b4)
Tff7b72+ Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffstandard_increment Tff7b72/ T79c0ff2
Tff7b72+ Tff7b72selfTff7b72.Td2a8ff_shift
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffshadow_offset Tff7b72= Tb4b4b4[T79c0ff0Tb4b4b4, T79c0ff30Tb4b4b4]
Tff7b72selfTff7b72.Td2a8ffon_modeTb4b4b4(Tff7b72NoneTb4b4b4, Tff7b72selfTff7b72.Td2a8ffmodeTb4b4b4)
Tff7b72def Td2a8ffon_type_heightTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3height_type_valueTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`type_height` attribute changes.
"""
Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM2Ta5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffheight Tff7b72= Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffstandard_increment
Tff7b72elseTb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8fftype Tff7b72!= Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4:
Tff7b72if Te6edf3height_type_value Tff7b72== Ta5d6ff"Ta5d6ffsmallTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffheight Tff7b72= Te6edf3dpTb4b4b4(T79c0ff64Tb4b4b4)
Tff7b72elif Te6edf3height_type_value Tff7b72== Ta5d6ff"Ta5d6ffmediumTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffheight Tff7b72= Te6edf3dpTb4b4b4(T79c0ff112Tb4b4b4)
Tff7b72elif Te6edf3height_type_value Tff7b72== Ta5d6ff"Ta5d6fflargeTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffheight Tff7b72= Te6edf3dpTb4b4b4(T79c0ff152Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffheight Tff7b72= Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffstandard_increment
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72selfTff7b72.Td2a8ffset_headline_font_styleTb4b4b4)
Tff7b72def Td2a8ffon_action_buttonTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
T8b949e"""
Method for the button used for the :class:`~MDBottomAppBar` class.
"""
Tff7b72def Td2a8ffon_overflow_clsTb4b4b4(
Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3instance_overflow_clsTb4b4b4: Te6edf3MDDropdownMenu
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`overflow_cls` attribute changes.
"""
Tff7b72selfTff7b72.Td2a8ffoverflow_cls Tff7b72= Te6edf3instance_overflow_cls
Tff7b72def Td2a8ffon_md_bg_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3color_valueTb4b4b4: Tffa657listTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`md_bg_color` attribute changes.
"""
Tff7b72def Td2a8ffon_md_bg_colorTb4b4b4(Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8fftype Tff7b72== Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffmd_bg_color Tff7b72= Tb4b4b4[T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4]
Tff7b72elseTb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ffset_bars_colorTb4b4b4:
Te6edf3set_bars_colorsTb4b4b4(
Te6edf3color_valueTb4b4b4, Tff7b72NoneTb4b4b4, Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8fftheme_style
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Te6edf3on_md_bg_colorTb4b4b4)
Tff7b72def Td2a8ffon_left_action_itemsTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3items_valueTb4b4b4: Tffa657listTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`left_action_items` attribute
changes.
"""
Tff7b72def Td2a8ffon_left_action_itemsTb4b4b4(Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffupdate_action_barTb4b4b4(Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffleft_actionsTb4b4b4, Te6edf3items_valueTb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Te6edf3on_left_action_itemsTb4b4b4)
Tff7b72def Td2a8ffon_right_action_itemsTb4b4b4(
Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3items_valueTb4b4b4: Tffa657list
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`right_action_items` attribute
changes.
"""
Tff7b72def Td2a8ffon_right_actionsTb4b4b4(Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffupdate_action_barTb4b4b4(Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTb4b4b4, Te6edf3items_valueTb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Te6edf3on_right_actionsTb4b4b4)
Tff7b72def Td2a8ffon_iconTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3icon_nameTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Called when the value of the :attr:`icon` attribute changes."""
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8fficon Tff7b72= Te6edf3icon_name
Tff7b72def Td2a8ffon_icon_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3icon_nameTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`icon_color` attribute changes.
"""
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffmd_bg_color Tff7b72= Te6edf3icon_name
Tff7b72def Td2a8ffon_md_bg_bottom_colorTb4b4b4(
Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3color_valueTb4b4b4: Tffa657list
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`md_bg_bottom_color` attribute
changes.
"""
Te6edf3set_bars_colorsTb4b4b4(Tff7b72NoneTb4b4b4, Te6edf3color_valueTb4b4b4, Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8fftheme_styleTb4b4b4)
Tff7b72def Td2a8ffon_anchor_titleTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3anchor_valueTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`anchor_title` attribute changes.
"""
Tff7b72def Td2a8ffon_anchor_titleTb4b4b4(Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8fflabel_titleTff7b72.Td2a8ffhalign Tff7b72= Te6edf3anchor_value
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Te6edf3on_anchor_titleTb4b4b4)
Tff7b72def Td2a8ffon_modeTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3mode_valueTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Called when the value of the :attr:`made` attribute changes."""
Tff7b72if Tff7b72selfTff7b72.Td2a8fftype Tff7b72== Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4:
Tff7b72return
Tff7b72def Td2a8ffon_modeTb4b4b4(Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4)Tb4b4b4:
Tff7b72def Td2a8ffset_button_posTb4b4b4(Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffx Tff7b72= Te6edf3x
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffy Tff7b72= Te6edf3y Tff7b72- Tff7b72selfTff7b72.Td2a8ff_rounded_rectangle_height Tff7b72/ T79c0ff2
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ff_hard_shadow_size Tff7b72= Tb4b4b4(T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ff_soft_shadow_size Tff7b72= Tb4b4b4(T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4)
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3scale_value_xTff7b72=T79c0ff1Tb4b4b4, Te6edf3scale_value_yTff7b72=T79c0ff1Tb4b4b4, Te6edf3scale_value_zTff7b72=T79c0ff1Tb4b4b4, Te6edf3dTff7b72=T79c0ff0.05
Tb4b4b4)
Te6edf3animTff7b72.Td2a8ffbindTb4b4b4(Te6edf3on_completeTff7b72=Tff7b72selfTff7b72.Td2a8ffset_shadowTb4b4b4)
Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTff7b72.Td2a8ffaction_buttonTb4b4b4)
Tff7b72if Te6edf3mode_value Tff7b72== Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffset_notchTb4b4b4(Tb4b4b4)
Te6edf3x Tff7b72= Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2 Tff7b72- Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2
Te6edf3y Tff7b72= Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ffcenterTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2Tb4b4b4)
Tff7b72+ Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffstandard_increment Tff7b72/ T79c0ff2
Tff7b72+ Tff7b72selfTff7b72.Td2a8ff_shift
Tb4b4b4)
Tff7b72elif Te6edf3mode_value Tff7b72== Ta5d6ff"Ta5d6ffendTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffset_notchTb4b4b4(Tb4b4b4)
Te6edf3x Tff7b72= Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72* T79c0ff2
Te6edf3y Tff7b72= Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ffcenterTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2Tb4b4b4)
Tff7b72+ Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffstandard_increment Tff7b72/ T79c0ff2
Tff7b72+ Tff7b72selfTff7b72.Td2a8ff_shift
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffright_action_items Tff7b72= Tb4b4b4[Tb4b4b4]
Tff7b72elif Te6edf3mode_value Tff7b72== Ta5d6ff"Ta5d6fffree-endTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffremove_notchTb4b4b4(Tb4b4b4)
Te6edf3x Tff7b72= Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72- Te6edf3dpTb4b4b4(T79c0ff10Tb4b4b4)
Te6edf3y Tff7b72= Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffheight Tff7b72+ Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2
Tff7b72elif Te6edf3mode_value Tff7b72== Ta5d6ff"Ta5d6fffree-centerTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffremove_notchTb4b4b4(Tb4b4b4)
Te6edf3x Tff7b72= Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2 Tff7b72- Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2
Te6edf3y Tff7b72= Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffheight Tff7b72+ Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2
Tff7b72selfTff7b72.Td2a8ffremove_shadowTb4b4b4(Tb4b4b4)
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3scale_value_xTff7b72=T79c0ff0Tb4b4b4, Te6edf3scale_value_yTff7b72=T79c0ff0Tb4b4b4, Te6edf3scale_value_zTff7b72=T79c0ff0Tb4b4b4, Te6edf3dTff7b72=T79c0ff0.1
Tb4b4b4)
Te6edf3animTff7b72.Td2a8ffbindTb4b4b4(Te6edf3on_completeTff7b72=Te6edf3set_button_posTb4b4b4)
Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTff7b72.Td2a8ffaction_buttonTb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Te6edf3on_modeTb4b4b4)
Tff7b72def Td2a8ffset_md_bg_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instance_toolbarTb4b4b4, Te6edf3color_valueTb4b4b4: Tffa657listTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72if Te6edf3color_value Tff7b72== Tb4b4b4[T79c0ff1.0Tb4b4b4, T79c0ff1.0Tb4b4b4, T79c0ff1.0Tb4b4b4, T79c0ff0.0Tb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffmd_bg_color Tff7b72= Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffprimary_color
Tff7b72def Td2a8ffset_notchTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(Te6edf3dTff7b72=T79c0ff0.1Tb4b4b4) Tff7b72+ Te6edf3AnimationTb4b4b4(
Te6edf3notch_radiusTff7b72=Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2 Tff7b72+ Te6edf3dpTb4b4b4(T79c0ff8Tb4b4b4)Tb4b4b4,
Te6edf3dTff7b72=T79c0ff0.1Tb4b4b4,
Tb4b4b4)
Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTb4b4b4)
Tff7b72def Td2a8ffset_shadowTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ff_elevation Tff7b72= Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffelevation
Tff7b72def Td2a8ffget_default_overflow_clsTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Te6edf3OverFlowMenuTb4b4b4:
Tff7b72return Te6edf3OverFlowMenuTb4b4b4(Te6edf3width_multTff7b72=T79c0ff4Tb4b4b4)
Tff7b72def Td2a8ffupdate_overflow_menu_itemsTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3action_buttonTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72for Te6edf3data Tff7b72in Tff7b72selfTff7b72.Td2a8ffoverflow_clsTff7b72.Td2a8ffitemsTb4b4b4:
Tff7b72if Te6edf3dataTb4b4b4[Ta5d6ff"Ta5d6fficonTa5d6ff"Tb4b4b4] Tff7b72== Te6edf3action_buttonTff7b72.Td2a8fficonTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffoverflow_clsTff7b72.Td2a8ffitemsTff7b72.Td2a8ffremoveTb4b4b4(Te6edf3dataTb4b4b4)
Tff7b72break
Tff7b72def Td2a8ffupdate_bar_heightTb4b4b4(
Tff7b72selfTb4b4b4, Te6edf3instance_theme_managerTb4b4b4, Te6edf3material_style_valueTb4b4b4: Tffa657str
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffon_type_heightTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72selfTff7b72.Td2a8fftype_heightTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffupdate_anchor_titleTb4b4b4(Te6edf3material_style_valueTb4b4b4)
Tff7b72def Td2a8ffupdate_floating_radiusTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3intervalTb4b4b4: Te6edf3UnionTb4b4b4[Tffa657intTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffradius Tff7b72= Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2
Tff7b72def Td2a8ffupdate_anchor_titleTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3material_style_valueTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tffa657strTb4b4b4:
Tff7b72if Te6edf3material_style_value Tff7b72== Ta5d6ff"Ta5d6ffM2Ta5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffanchor_title Tff7b72= Ta5d6ff"Ta5d6ffleftTa5d6ff"
Tff7b72elif Te6edf3material_style_value Tff7b72== Ta5d6ff"Ta5d6ffM3Ta5d6ff" Tff7b72and Tff7b72selfTff7b72.Td2a8fftype Tff7b72!= Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4:
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffanchor_titleTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffanchor_title Tff7b72= Ta5d6ff"Ta5d6ffcenterTa5d6ff"
Tff7b72elif Te6edf3material_style_value Tff7b72== Ta5d6ff"Ta5d6ffM3Ta5d6ff" Tff7b72and Tff7b72selfTff7b72.Td2a8fftype Tff7b72== Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffanchor_title Tff7b72= Ta5d6ff"Ta5d6ffleftTa5d6ff"
Tff7b72return Tff7b72selfTff7b72.Td2a8ffanchor_title
Tff7b72def Td2a8ffupdate_action_barTb4b4b4(
Tff7b72selfTb4b4b4, Te6edf3instance_box_layoutTb4b4b4, Te6edf3action_bar_itemsTb4b4b4: Tffa657list
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Te6edf3instance_box_layoutTff7b72.Td2a8ffclear_widgetsTb4b4b4(Tb4b4b4)
Te6edf3new_width Tff7b72= T79c0ff0
Tff7b72for Te6edf3item Tff7b72in Te6edf3action_bar_itemsTb4b4b4:
Te6edf3new_width Tff7b72+Tff7b72= Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4)
Tff7b72if Tffa657lenTb4b4b4(Te6edf3itemTb4b4b4) Tff7b72== T79c0ff1Tb4b4b4:
Te6edf3itemTff7b72.Td2a8ffappendTb4b4b4(Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72NoneTb4b4b4)
Tff7b72if Tffa657lenTb4b4b4(Te6edf3itemTb4b4b4) Tff7b72> T79c0ff1 Tff7b72and Tff7b72not Te6edf3itemTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4:
Te6edf3itemTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72= Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72None
Tff7b72if Tffa657lenTb4b4b4(Te6edf3itemTb4b4b4) Tff7b72== T79c0ff2Tb4b4b4:
Tff7b72if Tffa657isinstanceTb4b4b4(Te6edf3itemTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4, Tffa657strTb4b4b4) Tff7b72or Tffa657isinstanceTb4b4b4(Te6edf3itemTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4, Tffa657tupleTb4b4b4)Tb4b4b4:
Te6edf3itemTff7b72.Td2a8ffinsertTb4b4b4(T79c0ff1Tb4b4b4, Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72NoneTb4b4b4)
Tff7b72elseTb4b4b4:
Te6edf3itemTff7b72.Td2a8ffappendTb4b4b4(Ta5d6ff"Ta5d6ff"Tb4b4b4)
Tff7b72if Tffa657lenTb4b4b4(Te6edf3itemTb4b4b4) Tff7b72== T79c0ff3Tb4b4b4:
Tff7b72if Tffa657isinstanceTb4b4b4(Te6edf3itemTb4b4b4[T79c0ff2Tb4b4b4]Tb4b4b4, Tffa657tupleTb4b4b4)Tb4b4b4:
Te6edf3itemTff7b72.Td2a8ffinsertTb4b4b4(T79c0ff2Tb4b4b4, Ta5d6ff"Ta5d6ff"Tb4b4b4)
Te6edf3instance_box_layoutTff7b72.Td2a8ffadd_widgetTb4b4b4(
Te6edf3ActionTopAppBarButtonTb4b4b4(
Te6edf3iconTff7b72=Te6edf3itemTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4,
Te6edf3on_releaseTff7b72=Te6edf3itemTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4,
Te6edf3tooltip_textTff7b72=Te6edf3itemTb4b4b4[T79c0ff2Tb4b4b4]Tb4b4b4,
Te6edf3overflow_textTff7b72=Te6edf3itemTb4b4b4[T79c0ff3Tb4b4b4]
Tff7b72if Tb4b4b4(Tffa657lenTb4b4b4(Te6edf3itemTb4b4b4) Tff7b72== T79c0ff4 Tff7b72and Tffa657isinstanceTb4b4b4(Te6edf3itemTb4b4b4[T79c0ff3Tb4b4b4]Tb4b4b4, Tffa657strTb4b4b4)Tb4b4b4)
Tff7b72else Ta5d6ff"Ta5d6ff"Tb4b4b4,
Te6edf3theme_text_colorTff7b72=Ta5d6ff"Ta5d6ffCustomTa5d6ff"
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffopposite_colors
Tff7b72else Ta5d6ff"Ta5d6ffPrimaryTa5d6ff"Tb4b4b4,
Te6edf3text_colorTff7b72=Tff7b72selfTff7b72.Td2a8ffspecific_text_color
Tff7b72if Tff7b72not Tb4b4b4(Tffa657lenTb4b4b4(Te6edf3itemTb4b4b4) Tff7b72== T79c0ff4 Tff7b72and Tffa657isinstanceTb4b4b4(Te6edf3itemTb4b4b4[T79c0ff3Tb4b4b4]Tb4b4b4, Tffa657tupleTb4b4b4)Tb4b4b4)
Tff7b72else Te6edf3itemTb4b4b4[T79c0ff3Tb4b4b4]Tb4b4b4,
Te6edf3opposite_colorsTff7b72=Tff7b72selfTff7b72.Td2a8ffopposite_colorsTb4b4b4,
Tb4b4b4)
Tb4b4b4)
Te6edf3instance_box_layoutTff7b72.Td2a8ffwidth Tff7b72= Te6edf3new_width
Tff7b72def Td2a8ffupdate_md_bg_colorTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffmd_bg_color Tff7b72= Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ff_get_primary_colorTb4b4b4(Tb4b4b4)
Tff7b72def Td2a8ffupdate_action_bar_text_colorsTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72for Te6edf3child Tff7b72in Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffleft_actionsTff7b72.Td2a8ffchildrenTb4b4b4:
Te6edf3childTff7b72.Td2a8fftext_color Tff7b72= Tff7b72selfTff7b72.Td2a8ffspecific_text_color
Tff7b72for Te6edf3child Tff7b72in Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffright_actionsTff7b72.Td2a8ffchildrenTb4b4b4:
Te6edf3childTff7b72.Td2a8fftext_color Tff7b72= Tff7b72selfTff7b72.Td2a8ffspecific_text_color
Tff7b72def Td2a8ffremove_notchTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(Te6edf3dTff7b72=T79c0ff0.1Tb4b4b4) Tff7b72+ Te6edf3AnimationTb4b4b4(Te6edf3notch_radiusTff7b72=T79c0ff0Tb4b4b4, Te6edf3dTff7b72=T79c0ff0.1Tb4b4b4)
Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTb4b4b4)
Tff7b72def Td2a8ffremove_shadowTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffaction_buttonTff7b72.Td2a8ff_elevation Tff7b72= T79c0ff0
Tff7b72def Td2a8ff_update_specific_text_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3valueTb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ffspecific_text_color Tff7b72in Tb4b4b4(
Tb4b4b4[T79c0ff0.0Tb4b4b4, T79c0ff0.0Tb4b4b4, T79c0ff0.0Tb4b4b4, T79c0ff0.87Tb4b4b4]Tb4b4b4,
Tb4b4b4[T79c0ff0.0Tb4b4b4, T79c0ff0.0Tb4b4b4, T79c0ff0.0Tb4b4b4, T79c0ff1.0Tb4b4b4]Tb4b4b4,
Tb4b4b4[T79c0ff1.0Tb4b4b4, T79c0ff1.0Tb4b4b4, T79c0ff1.0Tb4b4b4, T79c0ff1.0Tb4b4b4]Tb4b4b4,
Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffspecific_text_color Tff7b72= Te6edf3text_colorsTb4b4b4[
Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffprimary_palette
Tb4b4b4]Tb4b4b4[Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffprimary_hueTb4b4b4]
Tff7b72class T56d364MDBottomAppBarTb4b4b4(
Te6edf3DeclarativeBehaviorTb4b4b4,
Te6edf3ThemableBehaviorTb4b4b4,
Te6edf3SpecificBackgroundColorBehaviorTb4b4b4,
Te6edf3CommonElevationBehaviorTb4b4b4,
Te6edf3FloatLayoutTb4b4b4,
Tb4b4b4)Tb4b4b4:
T8b949e"""
Bottom app bar class.
For more information, see in the
:class:`~kivymd.uix.behaviors.DeclarativeBehavior` and
:class:`~kivymd.theming.ThemableBehavior` and
:class:`~kivymd.uix.behaviors.SpecificBackgroundColorBehavior` and
:class:`~kivymd.uix.behaviors.CommonElevationBehavior` and
:class:`~kivy.uix.floatlayout.FloatLayout`
classes documentation.
:Events:
`on_show_bar`
The method is called when the :class:`~MDBottomAppBar` panel
is shown.
`on_hide_bar`
The method is called when the :class:`~MDBottomAppBar` panel
is hidden.
"""
Te6edf3md_bg_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tb4b4b4[T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4)
T8b949e"""
Color bar in (r, g, b, a) or string format.
:attr:`md_bg_color` is an :class:`~kivy.properties.ColorProperty`
and defaults to `[0, 0, 0, 0]`.
"""
Te6edf3icon_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
Color bar in (r, g, b, a) or string format.
.. versionadded:: 1.2.0
:attr:`icon_color` is an :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""
Te6edf3action_items Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The icons on the left bar.
.. versionadded:: 1.2.0
:attr:`action_items` is an :class:`~kivy.properties.ListProperty`
and defaults to `[]`.
"""
Te6edf3animation Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72TrueTb4b4b4)
T8b949e"""
# TODO: add description.
# FIXME: changing the value does not affect anything.
.. versionadded:: 1.2.0
:attr:`animation` is an :class:`~kivy.properties.BooleanProperty`
and defaults to `True`.
"""
Te6edf3show_transition Tff7b72= Te6edf3StringPropertyTb4b4b4(Ta5d6ff"Ta5d6fflinearTa5d6ff"Tb4b4b4)
T8b949e"""
Type of button display transition.
.. versionadded:: 1.2.0
:attr:`show_transition` is a :class:`~kivy.properties.StringProperty`
and defaults to `'linear'`.
"""
Te6edf3hide_transition Tff7b72= Te6edf3StringPropertyTb4b4b4(Ta5d6ff"Ta5d6ffin_backTa5d6ff"Tb4b4b4)
T8b949e"""
Type of button hidden transition.
.. versionadded:: 1.2.0
:attr:`hide_transition` is a :class:`~kivy.properties.StringProperty`
and defaults to `'in_back'`.
"""
Te6edf3hide_duration Tff7b72= Te6edf3NumericPropertyTb4b4b4(T79c0ff0.4Tb4b4b4)
T8b949e"""
Duration of button hidden transition.
.. versionadded:: 1.2.0
:attr:`hide_duration` is a :class:`~kivy.properties.NumericProperty`
and defaults to `0.2`.
"""
Te6edf3show_duration Tff7b72= Te6edf3NumericPropertyTb4b4b4(T79c0ff0.2Tb4b4b4)
T8b949e"""
Duration of button display transition.
.. versionadded:: 1.2.0
:attr:`show_duration` is a :class:`~kivy.properties.NumericProperty`
and defaults to `0.2`.
"""
Te6edf3scroll_cls Tff7b72= Te6edf3ObjectPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
Widget inherited from the :class:`~kivy.uix.scrollview.ScrollView` class.
The value must be set if the :attr:`allow_hidden` parameter is `True`.
.. versionadded:: 1.2.0
:attr:`scroll_cls` is a :class:`~kivy.properties.ObjectProperty`
and defaults to `None`.
"""
Te6edf3allow_hidden Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72FalseTb4b4b4)
T8b949e"""
Allows or disables hiding the panel when scrolling content.
If the value is `True`, the :attr:`scroll_cls` parameter must be specified.
.. versionadded:: 1.2.0
:attr:`allow_hidden` is a :class:`~kivy.properties.BooleanProperty`
and defaults to `False`.
"""
Te6edf3bar_is_hidden Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72FalseTb4b4b4)
T8b949e"""
Is the panel currently hidden.
.. versionadded:: 1.2.0
:attr:`bar_is_hidden` is a :class:`~kivy.properties.BooleanProperty`
and defaults to `False`.
"""
Te6edf3_padding Tff7b72= Te6edf3dpTb4b4b4(T79c0ff16Tb4b4b4)
Te6edf3_x Tff7b72= Tff7b72-Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4)
Te6edf3_scroll_cls_y Tff7b72= T79c0ff0
Te6edf3_cache Tff7b72= Tb4b4b4[Tb4b4b4]
Te6edf3_current_data Tff7b72= Tb4b4b4[Tb4b4b4]
Te6edf3_wait_removed Tff7b72= Tff7b72False
Te6edf3_animated_hidden Tff7b72= Tff7b72True
Te6edf3_animated_show Tff7b72= Tff7b72True
Te6edf3_fab_bottom_app_bar_button Tff7b72= Tff7b72None
Te6edf3_action_overflow_button Tff7b72= Tff7b72None
Tff7b72def Tff7b72__init__Tb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ff__init__Tb4b4b4(Tff7b72*Te6edf3argsTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffsize_hint_y Tff7b72= Tff7b72None
Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM3Ta5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffregister_event_typeTb4b4b4(Ta5d6ff"Ta5d6ffon_show_barTa5d6ff"Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffregister_event_typeTb4b4b4(Ta5d6ff"Ta5d6ffon_hide_barTa5d6ff"Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffheight Tff7b72= Te6edf3dpTb4b4b4(T79c0ff80Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72selfTff7b72.Td2a8ffset_bg_colorTb4b4b4)
Tff7b72def Td2a8ffbutton_centering_animationTb4b4b4(
Tff7b72selfTb4b4b4,
Te6edf3buttonTb4b4b4: Te6edf3MDActionOverFlowButton
Tff7b72| Te6edf3MDActionBottomAppBarButton
Tff7b72| Te6edf3MDFabBottomAppBarButtonTb4b4b4,
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Animation of centering buttons for
:class:`~MDActionOverFlowButton`,
:class:`~MDActionBottomAppBarButton` and
:class:`~MDFabBottomAppBarButton` classes.
"""
Tff7b72if Tff7b72selfTff7b72.Td2a8ffanimationTb4b4b4:
Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2 Tff7b72- Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4) Tff7b72/ T79c0ff2Tb4b4b4,
Te6edf3opacityTff7b72=T79c0ff1Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_transitionTb4b4b4,
Tb4b4b4)Tff7b72.Td2a8ffstartTb4b4b4(Te6edf3buttonTb4b4b4)
Tff7b72def Td2a8ffcheck_scroll_directionTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3scroll_clsTb4b4b4, Te6edf3yTb4b4b4: Tffa657floatTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Checks the scrolling direction.
Depending on the scrolling direction, hides or shows the
:class:`~MDBottomAppBar` panel.
"""
Tff7b72if Tffa657roundTb4b4b4(Te6edf3yTb4b4b4, T79c0ff1Tb4b4b4) Tff7b72< Tff7b72selfTff7b72.Td2a8ff_scroll_cls_y Tff7b72and Tff7b72not Tff7b72selfTff7b72.Td2a8ffbar_is_hiddenTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffhide_barTb4b4b4(Tb4b4b4)
Tff7b72if Tffa657roundTb4b4b4(Te6edf3yTb4b4b4, T79c0ff1Tb4b4b4) Tff7b72> Tff7b72selfTff7b72.Td2a8ff_scroll_cls_y Tff7b72and Tff7b72selfTff7b72.Td2a8ffbar_is_hiddenTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffshow_barTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_scroll_cls_y Tff7b72= Tffa657roundTb4b4b4(Te6edf3yTb4b4b4, T79c0ff1Tb4b4b4)
Tff7b72def Td2a8ffshow_barTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Show :class:`~MDBottomAppBar` panel."""
Tff7b72def Td2a8ffon_completeTb4b4b4(Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffdispatchTb4b4b4(Ta5d6ff"Ta5d6ffon_show_barTa5d6ff"Tb4b4b4)
Tff7b72def Td2a8ffon_progressTb4b4b4(Te6edf3animationTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3progressTb4b4b4)Tb4b4b4:
Tff7b72if Te6edf3progress Tff7b72> T79c0ff0.5 Tff7b72and Tff7b72selfTff7b72.Td2a8ff_animated_showTb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_animated_show Tff7b72= Tff7b72False
Tff7b72for Te6edf3iTb4b4b4, Te6edf3widget Tff7b72in Tffa657enumerateTb4b4b4(Tff7b72selfTff7b72.Td2a8ffchildrenTb4b4b4)Tb4b4b4:
Tff7b72if Tffa657isinstanceTb4b4b4(Te6edf3widgetTb4b4b4, Te6edf3MDActionBottomAppBarButtonTb4b4b4)Tb4b4b4:
Te6edf3anim_icon Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2 Tff7b72- Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4) Tff7b72/ T79c0ff2Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_transitionTb4b4b4,
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(
Tff7b72lambda Te6edf3xTb4b4b4, Te6edf3yTff7b72=Te6edf3widgetTb4b4b4: Te6edf3anim_iconTff7b72.Td2a8ffstartTb4b4b4(Te6edf3yTb4b4b4)Tb4b4b4,
Te6edf3i Tff7b72/ T79c0ff10Tb4b4b4,
Tb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTb4b4b4:
Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTff7b72.Td2a8ffy Tff7b72+ Te6edf3dpTb4b4b4(T79c0ff4Tb4b4b4)Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_transitionTb4b4b4,
Tb4b4b4)Tff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffbar_is_hidden Tff7b72= Tff7b72False
Tff7b72selfTff7b72.Td2a8ff_animated_show Tff7b72= Tff7b72True
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=T79c0ff0Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_transitionTb4b4b4,
Tb4b4b4)
Te6edf3animTff7b72.Td2a8ffbindTb4b4b4(Te6edf3on_progressTff7b72=Te6edf3on_progressTb4b4b4, Te6edf3on_completeTff7b72=Te6edf3on_completeTb4b4b4)
Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTb4b4b4)
Tff7b72def Td2a8ffhide_barTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Hide :class:`~MDBottomAppBar` panel."""
Tff7b72def Td2a8ffon_completeTb4b4b4(Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffdispatchTb4b4b4(Ta5d6ff"Ta5d6ffon_hide_barTa5d6ff"Tb4b4b4)
Tff7b72def Td2a8ffon_progressTb4b4b4(Te6edf3animationTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3progressTb4b4b4)Tb4b4b4:
Tff7b72if Tb4b4b4(
Te6edf3progress Tff7b72> T79c0ff0.5
Tff7b72and Tff7b72selfTff7b72.Td2a8ff_animated_hidden
Tff7b72and Te6edf3widget_icon Tff7b72== Te6edf3instanceTff7b72.Td2a8fficon
Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_animated_hidden Tff7b72= Tff7b72False
Te6edf3anim_bar Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=Tff7b72-Tff7b72selfTff7b72.Td2a8ffheightTb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_durationTb4b4b4,
T8b949e# t=self.hide_transition,
Tb4b4b4)
Te6edf3anim_barTff7b72.Td2a8ffbindTb4b4b4(Te6edf3on_completeTff7b72=Te6edf3on_completeTb4b4b4)
Te6edf3anim_barTff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTb4b4b4:
Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTff7b72.Td2a8ffy Tff7b72- Te6edf3dpTb4b4b4(T79c0ff4Tb4b4b4)Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_transitionTb4b4b4,
Tb4b4b4)Tff7b72.Td2a8ffstartTb4b4b4(Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffbar_is_hidden Tff7b72= Tff7b72True
Tff7b72selfTff7b72.Td2a8ff_animated_hidden Tff7b72= Tff7b72True
Te6edf3len_children Tff7b72= Tffa657lenTb4b4b4(Tff7b72selfTff7b72.Td2a8ffchildrenTb4b4b4)
Te6edf3widget_icon Tff7b72= Ta5d6ff"Ta5d6ff"
Tff7b72for Te6edf3iTb4b4b4, Te6edf3widget Tff7b72in Tffa657enumerateTb4b4b4(Tff7b72selfTff7b72.Td2a8ffchildrenTb4b4b4)Tb4b4b4:
Tff7b72if Tffa657isinstanceTb4b4b4(Te6edf3widgetTb4b4b4, Te6edf3MDActionBottomAppBarButtonTb4b4b4)Tb4b4b4:
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=Tff7b72-Te6edf3widgetTff7b72.Td2a8ffheightTb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_transitionTb4b4b4,
Tb4b4b4)
Tff7b72if Te6edf3i Tff7b72+ T79c0ff2 Tff7b72== Te6edf3len_childrenTb4b4b4:
Te6edf3widget_icon Tff7b72= Te6edf3widgetTff7b72.Td2a8fficon
Te6edf3animTff7b72.Td2a8ffbindTb4b4b4(Te6edf3on_progressTff7b72=Te6edf3on_progressTb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(
Tff7b72lambda Te6edf3xTb4b4b4, Te6edf3yTff7b72=Te6edf3widgetTb4b4b4: Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Te6edf3yTb4b4b4)Tb4b4b4,
Te6edf3i Tff7b72/ T79c0ff10Tb4b4b4,
Tb4b4b4)
Tff7b72def Td2a8ffon_show_barTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
The method is called when the :class:`~MDBottomAppBar` panel
is shown.
"""
Tff7b72def Td2a8ffon_hide_barTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
The method is called when the :class:`~MDBottomAppBar` panel
is hidden.
"""
Tff7b72def Td2a8ffon_scroll_clsTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3scroll_clsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`scroll_cls` attribute changes.
"""
Tff7b72def Td2a8ffon_scroll_clsTb4b4b4(Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffallow_hiddenTb4b4b4:
Te6edf3LoggerTff7b72.Td2a8ffwarningTb4b4b4(
Ta5d6ff"Ta5d6ffKivyMD: Ta5d6ff"
Ta5d6ff"Ta5d6ffIn order for the bottom bar to be automatically hidden Ta5d6ff"
Ta5d6ff"Ta5d6ffin addition to the `scroll_cls` parameter, set the value Ta5d6ff"
Ta5d6ff"Ta5d6ffof the `allow_hidden` parameter to `True`Ta5d6ff"
Tb4b4b4)
Tff7b72if Tffa657issubclassTb4b4b4(Te6edf3scroll_clsTff7b72.Td2a8ff__class__Tb4b4b4, Te6edf3ScrollViewTb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ffallow_hiddenTb4b4b4:
Te6edf3scroll_clsTff7b72.Td2a8ffbindTb4b4b4(Te6edf3scroll_yTff7b72=Tff7b72selfTff7b72.Td2a8ffcheck_scroll_directionTb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72raise Tf85149TypeErrorTb4b4b4(
Ta5d6fffTa5d6ff"Ta5d6ffThe `scroll_cls` parameter must be an object inherited from Ta5d6ff"
Ta5d6fffTa5d6ff"Ta5d6ffthe Tffd700{Te6edf3ScrollViewTffd700}Ta5d6ff classTa5d6ff"
Tb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM3Ta5d6ff"Tb4b4b4:
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Te6edf3on_scroll_clsTb4b4b4)
Tff7b72def Td2a8ffon_sizeTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Called when the root screen is resized."""
Tff7b72if Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_button
Tff7b72and Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM3Ta5d6ff"
Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTff7b72.Td2a8ffx Tff7b72= Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tb4b4b4(Te6edf3dpTb4b4b4(T79c0ff56Tb4b4b4) Tff7b72+ Te6edf3dpTb4b4b4(T79c0ff16Tb4b4b4)Tb4b4b4)
Tff7b72def Td2a8ffon_action_itemsTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3valueTb4b4b4: Tffa657listTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Called when the value of the :attr:`action_items` attribute changes.
"""
Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM2Ta5d6ff"Tb4b4b4:
Tff7b72return
Tff7b72def Td2a8ffwait_removedTb4b4b4(Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
Tff7b72if Tffa657lenTb4b4b4(Tff7b72selfTff7b72.Td2a8ffchildrenTb4b4b4) Tff7b72== T79c0ff1 Tff7b72or Tff7b72not Tff7b72selfTff7b72.Td2a8ffchildrenTb4b4b4:
Te6edf3ClockTff7b72.Td2a8ffunscheduleTb4b4b4(Te6edf3wait_removedTb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_wait_removed Tff7b72= Tff7b72False
Tff7b72selfTff7b72.Td2a8ff_x Tff7b72= Tff7b72-Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4)
Te6edf3asynckivyTff7b72.Td2a8ffstartTb4b4b4(Te6edf3add_widgetTb4b4b4(Tb4b4b4)Tb4b4b4)
Tff7b72async Tff7b72def Td2a8ffadd_widgetTb4b4b4(Tb4b4b4)Tb4b4b4:
Tff7b72for Te6edf3button Tff7b72in Te6edf3valueTb4b4b4:
Tff7b72await Te6edf3asynckivyTff7b72.Td2a8ffsleepTb4b4b4(T79c0ff0Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffadd_widgetTb4b4b4(Te6edf3buttonTb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8ff_cacheTb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_cacheTff7b72.Td2a8ffappendTb4b4b4(Te6edf3valueTb4b4b4)
Tff7b72for Te6edf3data Tff7b72in Tff7b72selfTff7b72.Td2a8ff_cacheTb4b4b4:
Tff7b72if Te6edf3valueTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72in Te6edf3dataTb4b4b4:
Tff7b72for Te6edf3iTb4b4b4, Te6edf3widget Tff7b72in Tffa657enumerateTb4b4b4(Tff7b72selfTff7b72.Td2a8ffchildrenTb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ff_wait_removedTb4b4b4:
Te6edf3ClockTff7b72.Td2a8ffschedule_intervalTb4b4b4(Te6edf3wait_removedTb4b4b4, T79c0ff0Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_wait_removed Tff7b72= Tff7b72True
Tff7b72if Tffa657isinstanceTb4b4b4(Te6edf3widgetTb4b4b4, Te6edf3MDActionBottomAppBarButtonTb4b4b4)Tb4b4b4:
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3yTff7b72=Tff7b72-Te6edf3widgetTff7b72.Td2a8ffheightTb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_transitionTb4b4b4,
Tb4b4b4)
Te6edf3animTff7b72.Td2a8ffbindTb4b4b4(
Te6edf3on_completeTff7b72=Tff7b72lambda Te6edf3xTb4b4b4, Te6edf3yTff7b72=Te6edf3widgetTb4b4b4: Tff7b72selfTff7b72.Td2a8ffremove_widgetTb4b4b4(
Te6edf3y
Tb4b4b4)
Tb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(
Tff7b72lambda Te6edf3xTb4b4b4, Te6edf3yTff7b72=Te6edf3widgetTb4b4b4: Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Te6edf3yTb4b4b4)Tb4b4b4,
Te6edf3i Tff7b72/ T79c0ff10Tb4b4b4,
Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_cacheTff7b72.Td2a8ffappendTb4b4b4(Te6edf3valueTb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_current_data Tff7b72= Te6edf3value
Te6edf3asynckivyTff7b72.Td2a8ffstartTb4b4b4(Te6edf3add_widgetTb4b4b4(Tb4b4b4)Tb4b4b4)
Tff7b72def Td2a8ffset_fab_opacityTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3arsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Sets the transparency value of the:class:`~MDFabBottomAppBarButton`
button.
"""
Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTff7b72.Td2a8ffidsTff7b72.Td2a8fflbl_icTff7b72.Td2a8ffopacity Tff7b72= T79c0ff1
Tff7b72def Td2a8ffset_fab_iconTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3valueTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Animates the size of the :class:`~MDFabBottomAppBarButton` button.
"""
Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_buttonTff7b72.Td2a8ffidsTff7b72.Td2a8fflbl_icTff7b72.Td2a8ffopacity Tff7b72= T79c0ff0
Te6edf3anim Tff7b72= Te6edf3AnimationTb4b4b4(
Te6edf3scale_value_xTff7b72=T79c0ff0Tb4b4b4,
Te6edf3scale_value_yTff7b72=T79c0ff0Tb4b4b4,
Te6edf3opacityTff7b72=T79c0ff0Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffhide_transitionTb4b4b4,
Tb4b4b4) Tff7b72+ Te6edf3AnimationTb4b4b4(
Te6edf3scale_value_xTff7b72=T79c0ff1Tb4b4b4,
Te6edf3scale_value_yTff7b72=T79c0ff1Tb4b4b4,
Te6edf3opacityTff7b72=T79c0ff1Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_durationTb4b4b4,
Te6edf3tTff7b72=Tff7b72selfTff7b72.Td2a8ffshow_transitionTb4b4b4,
Tb4b4b4)
Te6edf3animTff7b72.Td2a8ffbindTb4b4b4(Te6edf3on_completeTff7b72=Tff7b72selfTff7b72.Td2a8ffset_fab_opacityTb4b4b4)
Te6edf3animTff7b72.Td2a8ffstartTb4b4b4(Te6edf3instanceTb4b4b4)
Tff7b72def Td2a8ffset_bg_colorTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Sets the background color for the :class:`~MDBottomAppBar` class.
"""
Tff7b72if Tff7b72selfTff7b72.Td2a8ffmd_bg_color Tff7b72== Tb4b4b4[T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffmd_bg_color Tff7b72= Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffprimary_color
Tff7b72def Td2a8ffset_icon_colorTb4b4b4(
Tff7b72selfTb4b4b4, Te6edf3widgetTb4b4b4: Te6edf3MDActionOverFlowButton Tff7b72| Te6edf3MDActionBottomAppBarButton
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Sets the icon color for the :class:`~MDActionOverFlowButton` and
:class:`~MDActionBottomAppBarButton` classes.
"""
Tff7b72if Tff7b72selfTff7b72.Td2a8fficon_colorTb4b4b4:
Te6edf3widgetTff7b72.Td2a8fftheme_icon_color Tff7b72= Ta5d6ff"Ta5d6ffCustomTa5d6ff"
Te6edf3widgetTff7b72.Td2a8fficon_color Tff7b72= Tff7b72selfTff7b72.Td2a8fficon_color
Tff7b72def Td2a8ffadd_widgetTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3widgetTb4b4b4, Te6edf3indexTff7b72=T79c0ff0Tb4b4b4, Te6edf3canvasTff7b72=Tff7b72NoneTb4b4b4)Tb4b4b4:
T8b949e# For M2 style.
Tff7b72if Tb4b4b4(
Tffa657isinstanceTb4b4b4(Te6edf3widgetTb4b4b4, Te6edf3MDTopAppBarTb4b4b4)
Tff7b72and Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM2Ta5d6ff"
Tb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffadd_widgetTb4b4b4(Te6edf3widgetTb4b4b4)
Te6edf3widgetTff7b72.Td2a8ffelevation Tff7b72= T79c0ff0
Tff7b72return Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffadd_widgetTb4b4b4(Te6edf3widgetTff7b72.Td2a8ffaction_buttonTb4b4b4)
T8b949e# For M3 style.
Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffmaterial_style Tff7b72== Ta5d6ff"Ta5d6ffM3Ta5d6ff"Tb4b4b4:
Tff7b72if Tffa657isinstanceTb4b4b4(Te6edf3widgetTb4b4b4, Te6edf3MDActionBottomAppBarButtonTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_x Tff7b72+Tff7b72= Te6edf3widgetTff7b72.Td2a8ffwidth
Te6edf3widgetTff7b72.Td2a8ffpos Tff7b72= Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_x Tff7b72+ Tff7b72selfTff7b72.Td2a8ff_paddingTb4b4b4,
Tff7b72-Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4) Tff7b72if Tff7b72selfTff7b72.Td2a8ffanimation Tff7b72else Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2 Tff7b72- Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4) Tff7b72/ T79c0ff2Tb4b4b4,
Tb4b4b4)
Te6edf3widgetTff7b72.Td2a8ffopacity Tff7b72= Tffa657intTb4b4b4(Tff7b72not Tff7b72selfTff7b72.Td2a8ffanimationTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffset_icon_colorTb4b4b4(Te6edf3widgetTb4b4b4)
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffadd_widgetTb4b4b4(Te6edf3widgetTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffbutton_centering_animationTb4b4b4(Te6edf3widgetTb4b4b4)
Tff7b72elif Tffa657isinstanceTb4b4b4(Te6edf3widgetTb4b4b4, Te6edf3MDFabBottomAppBarButtonTb4b4b4)Tb4b4b4:
Te6edf3widgetTff7b72.Td2a8ffbindTb4b4b4(Te6edf3iconTff7b72=Tff7b72selfTff7b72.Td2a8ffset_fab_iconTb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_fab_bottom_app_bar_button Tff7b72= Te6edf3widget
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72selfTff7b72.Td2a8ffset_fab_opacityTb4b4b4)
Te6edf3widgetTff7b72.Td2a8ffscale_value_x Tff7b72= Tffa657intTb4b4b4(Tff7b72not Tff7b72selfTff7b72.Td2a8ffanimationTb4b4b4)
Te6edf3widgetTff7b72.Td2a8ffscale_value_y Tff7b72= Tffa657intTb4b4b4(Tff7b72not Tff7b72selfTff7b72.Td2a8ffanimationTb4b4b4)
Te6edf3widgetTff7b72.Td2a8ffpos Tff7b72= Tb4b4b4(
Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tb4b4b4(Te6edf3dpTb4b4b4(T79c0ff56Tb4b4b4) Tff7b72+ Tff7b72selfTff7b72.Td2a8ff_paddingTb4b4b4)Tb4b4b4,
Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2 Tff7b72- Te6edf3dpTb4b4b4(T79c0ff56Tb4b4b4) Tff7b72/ T79c0ff2Tb4b4b4,
Tb4b4b4)
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffadd_widgetTb4b4b4(Te6edf3widgetTb4b4b4)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────